package com.wxmp.wxcms.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wxmp.wxcms.domain.UserOrder;
import com.wxmp.wxcms.mapper.RegisterUserDao;
import com.wxmp.wxcms.mapper.UserOrderDao;
import com.wxmp.wxcms.service.UserOrderService;
@Service
public class UserOrderServiceImpl implements UserOrderService {

	@Autowired
	private UserOrderDao userOrderDao;
	@Resource
	private RegisterUserDao registerUserDao;
	
	@Override
	public List<UserOrder> getUserOrderListByPage(UserOrder searchEntity) {
		return userOrderDao.getUserOrderListByPage(searchEntity);
	}
	@Override
	public void add(UserOrder entity) {
		userOrderDao.add(entity);
		registerUserDao.updateUseDay(entity.getAddDays(), entity.getOpenid());
	}

	@Override
	public Integer deleteBatchIds(String[] ids) {
		return userOrderDao.deleteBatchIds(ids);
	}
}
